<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>工厂物料明细</title>
<body class="withvernav">
<div class="bodywrapper">
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle">工厂物料明细</h1>
  <span class="pagedesc"></span>
  <div class="menulist">
   
  </div>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
  <div id="basicform" class="subcontent"> 
    <!--搜索栏-->
    <div>
      <div style="clear: both"></div>
      <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    </div>
    <form class="stdform stdform2" method="get" id="search" action="/factory/ajaxbutton?op=showmaterial">
     <div class="tableoptions"> 
        &nbsp;
         编号: <input type="text" name="other" id="other" class="width200" value="{{$other}}" placeholder="物料编号或名称" />
       
        
        <button class="btn btn-primary" id="searchbtn">Search</button>
       </div>
    </form>
    <!--搜索栏结束-->
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
      <thead>
        <tr class="lbbt">
          <td bgcolor="#FEFFF1">物料编号</td>
          <td bgcolor="#FEFFF1">更新时间</td>
          <td bgcolor="#FEFFF1">操作人员</td>
          <td bgcolor="#FEFFF1">类型</td>
          <td bgcolor="#FEFFF1">描述</td>
          <td bgcolor="#FEFFF1">原数量</td>
          <td bgcolor="#FEFFF1">更新后数量</td>
        </tr>
      </thead>
      <tbody >
      {{foreach from=$orderlist item=li key=key}}
      <tr>
        <td valign="middle"  style="position:relative;">{{$li.mater_code}}</td>
        <td valign="middle" >{{$li.updatetime}}</td>
         <td valign="middle" >{{$li.createUser}}</td>
         <td valign="middle" >{{if $li.types==1}}增加{{/if}}{{if $li.types==2}}减少{{/if}}{{if $li.types==3}}修改{{/if}}</td>
        <td   style="position:relative;">{{$li.content}}
        
        </td>
        <td valign="middle" >{{$li.old_data}}</td>
        <td>
       {{$li.new_data}}
        
        </td>
      </tr>
     
      {{/foreach}}
     
        </tbody>
      
    </table>
    <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
  </div>
</div>


<form  method="post">
  <input type="hidden" name="editid" id="editid">
  <div class="modal fade" id="chumaterial" tabindex="-1" role="dialog" aria-labelledby="schumaterial" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="chuaddmaterialfrom"> 物料出库 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100" align="right">物料编号： </td>
              <td align="left"><input type="text" name="c_code" id="c_code">
                <font color="#FF0000">(*必选项)</font></td>
            </tr>
             <tr>
              <td width="100" align="right">出库数量： </td>
              <td align="left"><input type="text" name="c_num" id="c_num" onKeyUp="value=value.replace(/[^\d.]/g,'')">
                <font color="#FF0000">(*必选项)</font></td>
            </tr>
          
          <tr>
              <td width="100" align="right">描述： </td>
              <td align="left"><input type="text" name="c_memo" id="c_memo">
                <font color="#FF0000">(*必选项)</font></td>
            </tr>
          
           
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="chuku()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>

<!-- 模态框（Modal）添加支出 -->
<form  method="post">
  <input type="hidden" name="editid" id="editid">
  <div class="modal fade" id="showaddmaterialfrom" tabindex="-1" role="dialog" aria-labelledby="sshowaddmaterialfrom" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="showaddmaterialfrom"> 添加物料信息 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100" align="right">物料名称： </td>
              <td align="left"><input type="text" name="projeck" id="projeck">
                <font color="#FF0000">(*必选项)</font></td>
            </tr>
            <tr>
              <td width="100" align="right">编号： </td>
              <td align="left"><input type="text" name="code" id="code" class="width100">
                <font color="#FF0000">(*必选项，编号相同的物料，入库数量会合并)</font></td>
            </tr>
            <tr>
              <td width="100" align="right" >类别： </td>
              <td align="left">
              	<span id="type1" style="">
              	<select id="type" name="type" class="small_input">
                  <option value="">-请选择类别-</option>
                  {{foreach from=$newtype item=li key=key}}
                  <option   value="{{$li}}">{{$li}}</option>
                  {{/foreach}}
                </select>
                </span>
                <span id="type2" style="display:none">
                	 <input id="typename" type="text" value="" class="dfinput" value="typename" style="width: 120pt;height: 20pt;" placeholder="请输入类别名称"/>
                </span>
                &nbsp;&nbsp;<a href="javascript:void(0)" onClick="ontype()">添加类别</a></td>
            </tr>
             <tr >
              <td  align="right">供应商：</td>
              <td  align="left">
              
              
              <span id="type3" style="">
              	<select id="supplier" name="supplier" class="small_input">
                  <option value="">-请选择供应商-</option>
                   {{foreach from=$newsupplier item=li key=key}}
                  <option   value="{{$li}}">{{$li}}</option>
                  {{/foreach}}
                </select>
                </span>
                <span id="type4" style="display:none">
               <input id="suppliersearch" type="text" value="" class="dfinput" style="width: 120pt;height: 20pt;" placeholder="请输入供应商名称"/>
                </span>
                &nbsp;&nbsp;<a href="javascript:void(0)" onClick="ontypetwo()">添加供应商</a>
              
            </td>
            </tr>
             <tr>
              <td align="right">数量： </td>
              <td align="left"><input type="text" name="num" id="num" value="1" maxlength="200" style="width:100px;line-height:0.4;" class="small_input" /><font color="#FF0000">(*必选项)</font></td>
            </tr>
            <tr>
              <td  align="right">单价： </td>
              <td align="left"><input type="text" name="price" id="price" value="" maxlength="200" style="width:100px;line-height:0.4;" class="small_input" /><font color="#FF0000">(*必选项)</font></td>
            </tr>
           <tr>
              <td  align="right">单位： </td>
              <td align="left"><input type="text" name="dw" id="dw" value="" maxlength="200" style="width:100px;line-height:0.4;" class="small_input" /> <button onClick="document.getElementById('dw').value='个'" type="button">个</button>
              	<button onClick="document.getElementById('dw').value='米'" type="button">米</button>
                <button onClick="document.getElementById('dw').value='根'" type="button">根</button>
                <button onClick="document.getElementById('dw').value='块'" type="button">块</button><font color="#FF0000">(*必选项)</font></td>
            </tr>
            <tr>
              <td  align="right">描述：</td>
              <td  align="left"><textarea  class="full_input" name="descr" id="descr" cols="10" rows="5"></textarea></td>
            </tr>
           
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="atmangban()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>
</body>
</html>